package com.agou.app.admin.business.menu.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import com.agou.ssh.core.db.HibernateUtil;

public class TestAdminMenuDao {
	
	private static final SessionFactory sf ;
	
	static{
		 sf = HibernateUtil.getSessionFactory();
	}

	public static void main(String[] args) {
		
		
		TestAdminMenuDao test = new TestAdminMenuDao();
		try {
			test.test();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void test() throws Exception{
		Session session = sf.openSession();
		AdminMenuDao dao = new AdminMenuDao();
		dao.setJdbcSession(session);
		System.out.println(dao.queryMenu(2));
		session.close();
		sf.close();
	}

}
